﻿using System;

namespace diantou.dataModel
{
    /// <summary>
    /// 外部考试测试记录
    /// </summary>
    [fastCSharp.emit.jsonSerialize(IsAllMember = true)]
    [fastCSharp.emit.dataSerialize(IsReferenceMember = false, IsMemberMap = false)]
    //[fastCSharp.code.cSharp.webView.clientType(Name = "diantou.openJudge")]
    [fastCSharp.code.cSharp.sqlModel]
    public partial class openJudge
    {
        /// <summary>
        /// 提交标识
        /// </summary>
        public int Id;
        /// <summary>
        /// 用户标识
        /// </summary>
        [fastCSharp.emit.dataMember(PrimaryKeyIndex = 1)]
        public int UserId;
        /// <summary>
        /// 客户提交标识
        /// </summary>
        [fastCSharp.emit.dataMember(PrimaryKeyIndex = 2)]
        public int ClientId;
        /// <summary>
        /// 提交时间
        /// </summary>
        public DateTime SubmitTime;
        /// <summary>
        /// 问题标识
        /// </summary>
        public int ProblemId;
        /// <summary>
        /// 测试结果
        /// </summary>
        public OnlineJudge.JudgeResult Result;
        /// <summary>
        /// 测试状态
        /// </summary>
        public judgeState.state State;
        /// <summary>
        /// 测试错误数量
        /// </summary>
        public byte ErrorCount;
        /// <summary>
        /// 测试数据数量
        /// </summary>
        public byte TestCount;
        /// <summary>
        /// ReTry次数
        /// </summary>
        public byte RetryCount;
        /// <summary>
        /// 是否测试结束并且回调结束
        /// </summary>
        public bool IsFinished;

        /// <summary>
        /// 程序语言
        /// </summary>
        [fastCSharp.emit.dataMember(Group = 1)]
        public judgeState.languageType Language;
        /// <summary>
        /// 程序内容
        /// </summary>
        [fastCSharp.emit.dataMember(Group = 1, MaxStringLength = judgeState.MaxProgramContentLength)]
        public string ProgramContent = string.Empty;
    }
}